package oakclub.service;

import oakclub.global.Container;
import oakclub.model.AdminQueueModel;

public class AdminQueueService
{
    public enum ItemStatus
    {
        NEW(1), ACCEPT(2), REJECT(3), CHANGE_AVATAR(4), REPORT(5),
        UPDATE_VIDEO(6), DELETE_UPLOAD(7), UPDATE_FB_FRIENDS(8);

        private final int val;

        private ItemStatus(int val)
        {
            this.val = val;
        }

        public int val()
        {
            return this.val;
        }
    }

    public void addItem(long userId, ItemStatus status, Long sourceId, String note) throws Exception
    {
        AdminQueueModel adminQueueModel = (AdminQueueModel) Container.getComponent(AdminQueueModel.class);
        adminQueueModel.addItem(userId, status.val(), sourceId, note);
    }

    public void addItem(long userId, ItemStatus status) throws Exception
    {
        this.addItem(userId, status, null, null);
    }
}
